//
//  BaseViewController.m
//  investevent
//
//  Created by jiangshao on 2019/1/22.
//  Copyright © 2019年 com.scj.investevent. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [backBtn addTarget:self action:@selector(backBtn:) forControlEvents:UIControlEventTouchUpInside];
    backBtn.frame = CGRectMake(40, 7, 30, 30);
    [backBtn setImage:[UIImage imageNamed:@"general_top_icon_back_normal_ios"] forState:UIControlStateNormal];
    [backBtn setImage:[UIImage imageNamed:@"general_top_icon_back_pressed_ios"] forState:UIControlStateHighlighted];
    
    UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:backBtn];
    self.navigationItem.leftBarButtonItem = back;
    // Do any additional setup after loading the view.
}

-(IBAction)backBtn:(id)sender{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
